{extend name="public/basic"}
{block name="main"}
<form class = "layui-form" action="{:url('')}" method="get">
    <div class = "layui-col-xs3">
        <div class = "layui-form-item">
            <label class = "layui-form-label">名称</label>
            <div class = "layui-input-block">
                <input type="text" name="name" placeholder="请输入名称" value = "{$where['name']|default=''}" class="layui-input"/>
            </div>
        </div>
    </div>
    <button class="layui-btn layui-btn-success">查询</button>
    {auth:button rules="$buttons" rule="merchant/archives/sceneadd"}<button class = "layui-btn layui-btn-primary" action="dialog" action-url="{:url('sceneadd')}" action-title="新增场景" type = "button">新增</button>{/auth:button}
</form>
<table class="layui-table">
    <thead>
    <tr>
        <th>名称</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {volist name="records" id="vo"}
    <tr>
        <td>{$vo.name}</td>
        <td>
            {auth:button rules="$buttons" rule="merchant/archives/sceneedit"}<i class = "layui-icon layui-icon-edit" action="dialog" action-url="{:url('sceneedit',['id'=>$vo['id']])}" action-title="编辑场景" title="编辑场景"></i>{/auth:button}
            {auth:button rules="$buttons" rule="merchant/archives/scenedel"}<i class = "layui-icon layui-icon-delete" action="del" action-url="{:url('scenedel',['id'=>$vo['id']])}" action-title="删除" title="删除"></i>{/auth:button}
        </td>
    </tr>
    {/volist}
    </tbody>
</table>
{$records->render()}
{/block}